import Vue from 'vue'
import Router from 'vue-router'
// 登录
import login from '@/mobile/login'

import mIndex from '@/mobile/index'
// 会员管理
import mmIndex from '@/mobile/member/index'
import SLaborUnionAdmin from '@/mobile/member/labor'
import memberLists from '@/mobile/member/roster'
import mmChairman from '@/mobile/member/chairman'
import mmMember from '@/mobile/member/member'
import AFMembership from '@/mobile/member/register'
import mmDetail from '@/mobile/member/detail'
// 投票选举
import mvIndex from '@/mobile/vote/index'
import mvRanking from '@/mobile/vote/ranking'
import mvVote from '@/mobile/vote/vote'
// 活动专区
import activityList  from '@/mobile/activity/index'
import HWVote from '@/mobile/activity/HolidayWelfare'
import maApply from '@/mobile/activity/apply'
import maPrevious from '@/mobile/activity/previous'
import maList from '@/mobile/activity/list'
import maDetail from '@/mobile/activity/detail'
import maListNow from '@/mobile/activity/list-now'
import maNow from '@/mobile/activity/now'
// 困难帮扶
import difficultyHelp from '@/mobile/help/index'
import mhApply from '@/mobile/help/apply'
// 补充医疗互助申请
import msIndex from '@/mobile/supplement/index'
import msDetail from '@/mobile/supplement/detail'
import msRegister from '@/mobile/supplement/register'
import msSuccess from '@/mobile/supplement/success'
// 是否参加湖南医保
import isJoin from '@/mobile/supplement/isJoin'
// 是否自愿加入医疗互助
import isVolunteer from '@/mobile/supplement/isVolunteer'
// 文件下载
import fileDownloads from '@/mobile/file/index'
// 教代会提案
import mpIndex from '@/mobile/proposal/index'
import mpPrev from '@/mobile/proposal/previous'
import currentDR from '@/mobile/proposal/list'
import proposalList from '@/mobile/proposal/list'
import mpDetail from '@/mobile/proposal/detail'
// 个人中心
import myIndex from '@/mobile/my/index'
import myMessage from '@/mobile/my/message'
import myDetail from '@/mobile/my/detail'
import myImg from '@/mobile/my/myImg'

import myActivity from '@/mobile/my/activity'
import DifficultAllowance from '@/mobile/my/help'
import myHelpDetail from '@/mobile/my/helpDetail'

import MySMTMAAF from '@/mobile/my/supplement'
import mySupDetail from '@/mobile/my/supDetail'

import myProposal from '@/mobile/my/proposal'

import memberRegistration from '@/mobile/my/members.vue'
import Approveds from '@/mobile/my/approveds.vue'
import Activitys from '@/mobile/my/activitys.vue'
import difficultyHelpAudit from '@/mobile/my/helps.vue'
import SMTMAAFAudit from '@/mobile/my/mutual.vue'

Vue.use(Router)

// const originalPush = Router.prototype.push;
// Router.prototype.push = function push(location) {
//     return originalPush.call(this, location).catch(err => err)
// }

const roleListT = [
    // 登录
    {
        path: '/login',
        name: '登录',
        component: login
    },
    // 首页
    {
        path: '/',
        component: mIndex
    },
    // 会员管理
    {
        path: '/mmIndex',
        component: mmIndex
    },
    {
        path: '/SLaborUnionAdmin',
        name:'分工会管理',
        component: SLaborUnionAdmin
    },
    {
        path: '/memberLists',
        name: "会员名册",
        component: memberLists
    },
    {
        path: '/mmChairman',
        component: mmChairman
    },
    {
        path: '/mmMember',
        component: mmMember
    },
    {
        path: '/AFMembership',
        name: "会员注册",
        component: AFMembership
    },
    {
        path: '/mmDetail',
        component: mmDetail
    },
    // 投票选举
    {
        path: '/mvIndex',
        name:'投票选举',
        component: mvIndex
    },
    {
        path: '/mvRanking',
        name:'投票排行榜',
        component: mvRanking
    },
    {
        path: '/mvVote',
        name:'投票选举',
        component: mvVote
    },
    // 活动专区
    {
        path: '/activityList',
        name:'活动专区',
        component: activityList
    },
    {
        path: '/ALAudit',
        name:'活动审核',
        component: maList
    },

    {
        path: '/maApply',
        name: '填写活动电子报名表',
        component: maApply
    },
    {
        path: '/maPrevious',
        name: '往期活动回顾',
        component: maPrevious
    },
    {
        path: '/maList',

        name: '往期活动列表',
        component: maList
    },
    {
        path: '/maDetail',
        name: '活动详情',
        component: maDetail
    },
    {
        path: '/maListNow',
        name:'当前活动列表',
        component: maListNow
    },
    {
        path: '/maNow',
        name: '当前活动列表详情',
        component: maNow
    },
    // 困难帮扶
    // {
    //     name: "困难帮扶",
    //     path: "/difficultyHelp",
    //     component: "difficultyHelp",
    //     meta: {
    //         title: "困难帮扶",
    //         // icon: "buzhuxiangmu"
    //         icon: "buzhuxiangmu"
    //     },

    {
        path: '/difficultyHelp',
        name: '困难帮扶',
        component: difficultyHelp
    },
    {
        path: '/mhApply',
        name: '困难帮扶确认申请',
        component: mhApply
    },
    // 补充医疗互助申请
    {
        path: '/msIndex',
        name: '补充医疗互助申请',
        component: msIndex
    },
    {
        path: '/msDetail',
        name: '补充医疗互助申请详情',
        component: msDetail
    },
    // 是否加入湖南医保
    {
        path: '/isJoin',
        name: '是否加入湖南医保',
        component: isJoin
    },
    // 是否自愿加入医疗互助
    {
        path: '/isVolunteer ',
        component: isVolunteer
    },
    {
        path: '/msRegister',
        name: '补充医疗互助申请提交',
        component: msRegister
    },
    {
        path: '/msSuccess',
        component: msSuccess
    },
    //文件下载
    {
        path: '/fileDownloads',
        name: '文件下载',
        component: fileDownloads
    },
    // 教代会提案
    {
        path: '/mpIndex',
        name: '教代会提案',
        component: mpIndex
    },
    {
        path: '/mpPrev',
        name: '历届提案',
        component: mpPrev
    },
    {
        path: '/currentDR',
        name: '本届提案',
        component: currentDR
    },
    {
        path: '/proposalList',
        component: proposalList
    },
    {
        path: '/mpDetail',
        component: mpDetail
    },
    // 个人中心
    {
        path: '/myIndex',
        name: '个人中心',
        component: myIndex
    },
    {
        path: '/myMessage',
        name: '消息',
        component: myMessage
    },
    {
        path: '/myDetail',
        component: myDetail
    },
    {
        path: '/myDetail',
        component: myDetail
    },
    {
        path: '/myImg',
        name: '我的图集',
        component: myImg
    },
    {
        path: '/myActivity',
        name: '活动参与',
        component: myActivity
    },

    {
        path: '/DifficultAllowance',
        name:'我申请的困难帮扶',
        component: DifficultAllowance
    },
    {
        path: '/myHelpDetail',
        name:'我申请的困难帮扶详情',
        component: myHelpDetail
    },

    {
        path: '/MySMTMAAF',
        name:'我申请的补充医疗互助',
        component: MySMTMAAF
    },
    {
        path: '/mySupDetail',
        name:'我申请的补充医疗互助详情',
        component: mySupDetail
    },

    {
        path: '/myProposal',
        component: myProposal
    },
    {
        path: '/memberRegistration',
        name: '会员审核',
        component: memberRegistration
    },
    {
        path: '/approveds',
        component: Approveds
    },
    {
        path: '/activitys',
        component: Activitys
    },
    {
        path: '/difficultyHelpAudit',
        name:'年度困难补助审核 ',
        component: difficultyHelpAudit
    },
    {
        path: '/SMTMAAFAudit',
        name:'补充医疗互助申请审核',
        component: SMTMAAFAudit
    },
    // 活动福利详情
    {
        path: '/HWVote',
        name:'节日福利投票',
        component: HWVote
    },
]
export default new Router({
    mode: 'history',
  //   base: process.env.BASE_ENV === 'dev'?'':'/mobile/',
     base:'/mobile',
     routes: roleListT
})
